import { createApp, h } from 'vue';

import App from './App.vue';
// 导入路由
// createWebHashHistory  Hash
import { createRouter, createWebHashHistory, createWebHistory } from 'vue-router';

import Home from './views/Home.vue';
import Shop from './views/Shop.vue';
import NotFound from './views/NotFound.vue';

const router = createRouter({
  history: createWebHistory(),
  routes: [
    {
      path: '/home',
      component: Home
    }, {
      path: '/shop/:id',
      component: Shop
    }, {
      path: '/:str(.*)',
      component: NotFound
    }
  ]
});
const app = createApp(App);

app.use(router);

app.mount('#app');
